/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface WmsMoOrderMoall extends BasicModel<WmsMoOrderMoall> {
  allocateid?: number; // allocateid
  modid?: number; // modid
  invcode?: string; // 存货编码
  sortseq?: number; // 行号
  cinvname?: string; // 存货名称
  cinvstd?: string; // 规格型号
  whcode?: string; // 仓库编码
  cwhname?: string; // 仓库名称
  qty?: string; // 发料数量
  issqty?: string; // 已领量
  wiptype?: number; // 供应状态
  whtype?: string; // 仓库类型
  sumqty?: number; // 累计领料数
}

export const wmsMoOrderMoallList = (params?: WmsMoOrderMoall | any) =>
  defHttp.get<WmsMoOrderMoall>({ url: adminPath + '/mo/order/wmsMoOrderMoall/list', params });

export const wmsMoOrderMoallListData = (params?: WmsMoOrderMoall | any) =>
  defHttp.post<Page<WmsMoOrderMoall>>({
    url: adminPath + '/mo/order/wmsMoOrderMoall/listData',
    params,
  });

export const wmsMoOrderMoallListDataByStaus = (params?: WmsMoOrderMoall | any) =>
  defHttp.post<Page<WmsMoOrderMoall>>({
    url: adminPath + '/mo/order/wmsMoOrderMoall/listDataByStatus',
    params,
  });

export const wmsMoOrderMoallForm = (params?: WmsMoOrderMoall | any) =>
  defHttp.get<WmsMoOrderMoall>({ url: adminPath + '/mo/order/wmsMoOrderMoall/form', params });

export const wmsMoOrderMoallSave = (params?: any, data?: WmsMoOrderMoall | any) =>
  defHttp.postJson<WmsMoOrderMoall>({
    url: adminPath + '/mo/order/wmsMoOrderMoall/save',
    params,
    data,
  });

export const wmsMoOrderMoallDelete = (params?: WmsMoOrderMoall | any) =>
  defHttp.get<WmsMoOrderMoall>({ url: adminPath + '/mo/order/wmsMoOrderMoall/delete', params });
